
{%extends 'base.html'%}
{%block head%}

{%endblock head%}
{%block content%}

	<div class="navbar_con">
		<div class="navbar clearfix">
			<div class="subnav_con fl">
				<h1>全部商品分类</h1>	
				<span></span>			
				<ul class="subnav">
					<li><a href="/goods/list1_1_1" class="fruit">地标水果</a></li>
					<li><a href="/goods/list2_1_1" class="seafood">海外水果</a></li>
					<li><a href="/goods/list3_1_1" class="meet">时令水果</a></li>
					<li><a href="/goods/list4_1_1" class="egg">特色水果</a></li>
					<li><a href="/goods/list5_1_1" class="vegetables">果篮</a></li>
					<li><a href="/goods/list6_1_1" class="ice">水果干</a></li>
				</ul>
			</div>
			<ul class="navlist fl">
				<li><a href="#">浏览</a></li>
			</ul>
		</div>
	</div>

	<div class="breadcrumb">
		<a href="#">全部分类</a>
		<span>></span>
		<a href="#">新鲜水果</a>
	</div>

	<div class="main_wrap clearfix">
		<div class="l_wrap fl clearfix">
			<div class="new_goods">
				<h3>新品推荐</h3>
				<ul>
					{%for new in news%}
					<li>
						<a href="/goods/{{new.id}}/"><img src="/static/{{new.gpic}}"></a>
						<h4><a href="/goods/{{new.id}}/">{{new.gtitle}}</a></h4>
						<div class="prize">￥{{new.gprice}}</div>
					</li>
					{%endfor%}
				</ul>
			</div>
		</div>

		<div class="r_wrap fr clearfix">
			<div class="sort_bar">
				<a href="/goods/list{{typeinfo.id}}_1_1/"
				{%if sort == "1"%}
				   class="active"
				{%endif%}
				>上架时间</a>
				<a href="/goods/list{{typeinfo.id}}_1_2/"
				{%if sort == "2"%}
					class="active"
				{%endif%}
				>价格</a>
				<a href="/goods/list{{typeinfo.id}}_1_3/"
				{%if sort == "3"%}
					class="active"
				{%endif%}
				>点击量</a>
			</div>

			<ul class="goods_type_list clearfix">
				{%for g in page%}
				<li>
					<a href="/goods/{{g.id}}/"><img src="/static/{{g.gpic}}"></a>
					<h4><a href="/goods/{{g.id}}/">{{g.gtitle}}</a></h4>
					<div class="operate">
						<span class="prize">￥{{g.gprice}}</span>
						<span class="unit">{{g.gunit}}</span>
						<a href="/cart/add{{g.id}}_1/" class="add_goods" title="加入购物车"></a>
					</div>
				</li>
				{%endfor%}
			</ul>

			<div class="pagenation">
				{%if page.has_previous%}
				<a href="/goods/list{{typeinfo.id}}_{{page.previous_page_number}}_{{sort}}">上一页</a>
				{%endif%}

				{%for pindex in pagintor.page_range%}
				{%if pindex == page.number%}
				<a href="#" class="active">{{pindex }}</a>
				{%else%}
				<a href="/goods/list{{typeinfo.id}}_{{pindex}}_{{sort}}/" class="active">{{pindex }}</a>
				{%endif%}
				{%endfor%}

				{%if page.has_next%}
				<a href="/goods/list{{typeinfo.id}}_{{page.next_page_number}}_{{sort}}/">下一页</a>
				{%endif%}
			</div>
		</div>
	</div>
{%endblock content%}

